Page({
  data: {
    from: '',
  },
  onLoad(e) {
    console.log(e)
    if (e.from != undefined) {
      this.setData({
        from: e.from
      })
    }
  },
  bindgetuserinfo(e) {
    var status = e.detail.errMsg;
    if (status == 'getUserInfo:fail auth deny') {
      console.log('授权失败')
    } else {
      var toPage;
      if (this.data.from == "index") {
        toPage = '../index/index';
      }
      wx.redirectTo({
        url: toPage
      })
    }
  },

})